package com.wizz.trade.trading.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 进口成本参考表
 * </p>
 *
 * @author fyftless
 * @since 2023-04-23 04:37:04
 */
@Getter
@Setter
@TableName("import_cost")
public class ImportCost implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "Id", type = IdType.AUTO)
    private Integer id;

    /**
     * 关联持仓表 cur=外币 id (持仓表/进口成本参考价表)
     */
    @TableField("position")
    private Integer position;

    /**
     * 汇率参考值，输入值
     */
    @TableField("exrate")
    private Double exrate;

    /**
     * 本币参考价（进口成本），计算值 local currency price lcprice=atprice*exrate 汇率*(1+关税率)*(1+增值税税率)
     */
    @TableField("costprice")
    private BigDecimal costprice;

    /**
     * 本币结算价 location currency settle price（版本v1.1）
     */
    @TableField("settleprice")
    private BigDecimal settleprice;

    /**
     * （对应币种结算价settleprice-成本价costprice)*持仓量(oi)
     */
    @TableField("reffpl")
    private BigDecimal reffpl;

    /**
     * 币种
     */
    @TableField("currency")
    private Integer currency;

    /**
     * 批次号
     */
    @TableField("batch_no")
    private String batchNo;
}
